﻿using Microsoft.EntityFrameworkCore.Metadata.Internal;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Linq;

namespace MYData.Entity.DomainModels
{
    public class ProjectSourceOutputDto
    {
        /// <summary>
        ///项目来源表主键
        /// </summary>
        [Key]
        [Display(Name = "项目来源表主键")]
        [MaxLength(64)]
        [Column(TypeName = "uniqueidentifier")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public string Id { get; set; }

        /// <summary>
        ///项目来源编号
        /// </summary>
        [Display(Name = "项目来源编号")]
        [MaxLength(255)]
        [Column(TypeName = "nvarchar(255)")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public string dicKey { get; set; }

        /// <summary>
        ///项目来源名称
        /// </summary>
        [Display(Name = "项目来源名称")]
        [MaxLength(255)]
        [Column(TypeName = "nvarchar(255)")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public string dicValue { get; set; }

        /// <summary>
        ///上级编号
        /// </summary>
        [Display(Name = "上级编号")]
        [MaxLength(64)]
        [Column(TypeName = "nvarchar(64)")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public string dicCode { get; set; }

        /// <summary>
        ///排序编号
        /// </summary>
        [Display(Name = "排序编号")]
        [Column(TypeName = "int")]
        [Editable(true)]
        public int? dicSort { get; set; }

        /// <summary>
        ///项目来源状态
        /// </summary>
        [Display(Name = "项目来源状态")]
        [Column(TypeName = "int")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public int dicStatus { get; set; }

        /// <summary>
        ///项目id
        /// </summary>
        [Display(Name = "项目id")]
        [MaxLength(64)]
        [Column(TypeName = "nvarchar(64)")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public string productId { get; set; }

        /// <summary>
        ///项目承办单位Id
        /// </summary>
        [Display(Name = "项目承办单位Id")]
        [MaxLength(64)]
        [Column(TypeName = "nvarchar(64)")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public string orgId { get; set; }

        /// <summary>
        ///项目承办名称
        /// </summary>
        [Display(Name = "项目承办名称")]
        [MaxLength(255)]
        [Column(TypeName = "nvarchar(255)")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public string orgName { get; set; }

        /// <summary>
        ///项目名称
        /// </summary>
        [Display(Name = "项目名称")]
        [MaxLength(255)]
        [Column(TypeName = "nvarchar(255)")]
        [Editable(true)]
        [Required(AllowEmptyStrings = false)]
        public string productName { get; set; }

        public bool State { get; set; } = true;
        public List<ProjectSourceOutputDto> children { get; set; }
    }
}
